
public class Homework2 {

	public static void main(String[] args) {
		int num = 0;
		for (int i = 2; i <= 100; i++) {
			int j = 2;
			while (i % j != 0) {
				j++;

			}
			if (i == j) {
				System.out.println(i);
				num++;
			}

		}
		System.out.println("总共有：" + num + "个质数");
	}
}